<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加新收货地址</title>
<link href="__APP__/statics/css/style.css" rel="stylesheet" type="text/css"  charset="utf-8"/>
<script src="__APP__/statics/jquery.1.4.2.js"></script>
</head>
<body>

<div style="border:2px dotted #FF0000;padding:10px;margin-left:4px;">
<table>
	<tr>
		<td align="right">
		<p align="right">省：</td>
		<td>
		<span id="prov"><select size="1" name="province">
		  <option value="no">请选择省份</option>
<volist name="province" id="province">
          <option value="{$province.area_id}">{$province.local_name}</option>
</volist>
		</select>
		</span>
		<span id="city">
		</span>
		
		<span id="zone">
		</span>
		</td>
	</tr>
	<tr>
		<td align="right">街道地址：</td>
		<td><textarea rows="2" name="street" cols="65"></textarea></td>
	</tr>
	<tr>
		<td align="right" colspan="2">　</td>
	</tr>
	<tr>
		<td align="right">收货人姓名：</td>
		<td><input type="text" name="ship_name" size="20"></td>
	</tr>
	<tr>
		<td align="right">手机(电话)：</td>
		<td><input type="text" name="ship_mobile" size="20"></td>
	</tr>
</table>
</div>



<script>
$("[name=province]").change(function(){
       var province=$("[name=province]").val();
       $.ajax({
				    type:"GET",
					url:"__URL__/get_city",
					dataType:"html",
					data:{province:province},
					success:function(data){
					      $("#city").html(data);
						  getZone();
						  countShip();
					 }
	   })
   
})

function getZone(){
     var city=$("[name=city]").val();
       $.ajax({type:"GET",url:"__URL__/get_zone",dataType:"html",data:{city:city},success:function(data){$("#zone").html(data);}})

	   $("[name=city]").change(function(){
	         var city=$("[name=city]").val();
			 $.ajax({type:"GET",url:"__URL__/get_zone",dataType:"html",data:{city:city},success:function(data){$("#zone").html(data);}})
       })
}


</script>
</body>
</html>